<?php

class Application_Form_modifierassignemodelprojet extends Zend_Form
{


    public function init()
    {
        /* Form Elements & Other Definitions Here ... */
    	
    	$this->setName("Formulairemodifierassignemodelprojet");
    	 
    	$mapper= new Application_Model_Mapper_PilotProject();
    	$select=$mapper->fetchAllToArray();
    	     	 
    	$tmp=array();
    	$tmp['']="selectionner projet";
    	foreach ($select as $key => $value ){
    		$tmp[ $value['idPILOT_PROJECT'] ] = $value['NomProjet'];
    	}
    	$listprojet = array("multiOptions" => $tmp);
    	
    	 
    	$projet= new Zend_Form_Element_Select('idPILOT_PROJECT',  $listprojet);
    	$projet->setLabel('Nom du Projet')	;
    	//$ModelActivite->setAttrib('onChange', "loadCombo('diplomeselector','id='+this.value+'&typedip=Domaine','option4');");
    	 
    	$mapperaxes = new Application_Model_Mapper_PilotModelanalyse();
    	$axes=$mapperaxes->fetchAllToArray();
    	 
    	$checkboxlist=array();
    	 
    	foreach($axes as $key => $value){
    		$checkboxlist[$value['idPILOT_MODELANALYSE']]=$value['NOMMODEL'];
    	}
    	 
    	$element = new Zend_Form_Element_MultiCheckbox('idPILOT_MODELANALYSE', array(
    			'multiOptions' => $checkboxlist
    	));
    	$element->setValue(array('choisir', 'modele'));
    	$element->setLabel("");
    	 
    	$mapper= new Application_Model_Mapper_PilotListclients();
    	$select=$mapper->fetchAllToArray();
    	
    	
    	$tmp=array();
    	$tmp['']="selectionner client";
    	foreach ($select as $key => $value ){
    		$tmp[ $value['idPILOT_LISTCLIENTS'] ] = $value['NOMCLIENT'];
    	}
    	$listclient = array("multiOptions" => $tmp);
    	
    	$client= new Zend_Form_Element_Select('idPILOT_LISTCLIENTS',  $listclient);
    	$client->setLabel('Nom du Client')	;
    	 
    	$submit = new Zend_Form_Element_Submit('Ajouter');
    	$submit->setLabel('Modifier');
    	
    	$this->addElements(array($projet,$client,$element,$submit));
    	 
    	//$this->setDecorators( array( array('ViewScript', array('viewScript' => 'acceuil/menuform.phtml'))));
    	   
    	 
    	//$this->setDecorators( array( array('ViewScript', array('viewScript' => 'protypeform.phtml'))));
    	
    }

	
}

